<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">

    <title>系统后台 - 登录</title>
    <link href="<%=request.getContextPath()%>/views/sysdefault/css/bootstrap.min.css" rel="stylesheet">
    <link href="<%=request.getContextPath()%>/views/sysdefault/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="<%=request.getContextPath()%>/views/sysdefault/css/animate.min.css" rel="stylesheet">
    <link href="<%=request.getContextPath()%>/views/sysdefault/css/style.min.css" rel="stylesheet">
    <link href="<%=request.getContextPath()%>/views/sysdefault/css/login.min.css" rel="stylesheet">
    <link href="<%=request.getContextPath()%>/views/sysdefault/css/plugins/toastr/toastr.min.css" rel="stylesheet">
    <script>
        if(window.top!==window.self){window.top.location=window.location};
    </script>

</head>

<body class="signin" style="text-align:center;padding-left: 1px;padding-right: 1px;">
    <div class="signinpanel">
        <div class="row" style="margin-right: 0px;margin-left: 0px;">
            <div class="col-sm-7 col-xs-11">
                <div class="signin-info">
                    <div class="logopanel m-b" style="text-align: center;">

                        <h1>临桂区公安队伍<br>精细化管理后台</h1>
                    </div>
                    <div class="m-b"></div>
                   <!--  <h4>欢迎使用临桂公安队伍精细化管理平台</h4> -->
                    <ul class="m-b">
                        <!-- <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 优势一</li>
                        <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 优势二</li>
                        <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 优势三</li>
                        <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 优势四</li>
                        <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 优势五</li> -->
                    </ul>
                   <!--  <strong>还没有账号？ <a href="#">立即注册&raquo;</a></strong> -->
                </div>
            </div>
            <div class="col-sm-5 col-xs-11">
                <form id="loginForm" method="post" action="system/login.do" onsubmit="return loginSub()">
                    <input type="text" class="form-control uname" placeholder="用户名" name="number" required="" />
                    

                    <input type="password" class="form-control pword m-b" placeholder="密码" name="pwd" required="" />
                   
                    <!-- <a href="">忘记密码了？</a> -->
                    <button class="btn btn-success btn-block">登录</button>
                </form>
            </div>
        </div>
        <div class="signup-footer col-xs-11">
            <div class="col-lg-12 col-md-12 col-sm-12  col-xs-12 " style="font-size: 10px;">Copyright © 2016-2020 LinGui Police.All rights reserved.</div>
        </div>
    </div>
    
    <script src="<%=request.getContextPath()%>/views/sysdefault/js/jquery.min.js?v=2.1.4"></script>
    <script src="<%=request.getContextPath()%>/views/sysdefault/js/bootstrap.min.js?v=3.3.5"></script>
    <script src="<%=request.getContextPath()%>/views/sysdefault/js/plugins/toastr/toastr.min.js"></script>
    <script>
    
    var basePath = '<%=request.getContextPath()%>';
    
     toastr.options = {
    		  "closeButton": true,
    		  "debug": false,
    		  "progressBar": true,
    		  "positionClass": "toast-top-center",
    		  "showDuration": "400",
    		  "hideDuration": "1000",
    		  "timeOut": "7000",
    		  "extendedTimeOut": "1000",
    		  "showEasing": "swing",
    		  "hideEasing": "linear",
    		  "showMethod": "fadeIn",
    		  "hideMethod": "fadeOut"
    		}
    
    	var loginSub = function(){
    	
    		$.ajax({
				type : "POST",
				url : basePath + "/system/loginCheck.dop",
				data : $("#loginForm").serialize(),
				dataType : "json",
				success : function(msg) { 
					if (msg.errCode == '1') {
						
						window.location.href = basePath + "/system/login.dop";
					
					} else {
						toastr.error(msg.errMsg, "登录失败");
					}
				
				},
				error : function(XMLHttpRequest, textStatus, errorThrown) {
					toastr.error("系统出错", "登录失败");
				}
			});
    	
    		return false;
    	}
    </script>
</body>

</html>